﻿using ERP.ErrorCode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AgriSmart.ErrorCode
{
    /// <summary>
    /// API统一返回结果模型
    /// </summary>
    /// <remarks>
    /// 用于统一API接口的返回格式，包含状态码、消息和数据
    /// </remarks>
    /// <typeparam name="T">返回数据的类型</typeparam>
    public class ApiResult<T>
    {
        /// <summary>
        /// 状态码
        /// </summary>
        /// <example>200</example>
        public BaseEnums Code { get; set; }

        /// <summary>
        /// 返回消息
        /// </summary>
        /// <example>操作成功</example>
        public string? Msg { get; set; }

        /// <summary>
        /// 返回数据
        /// </summary>
        public T? Data { get; set; }
    }
}
